diff --git a/.htaccess b/.htaccess
index 237b280..55edd20 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,4 +1,18 @@
+Options -Indexes
+
+
RewriteEngine On
RewriteCond $1 !^(css)
RewriteRule ^([^/]*)/([^/]*)$ /?dir=$1&file=$2 [L]
-AddType text/css .css
\ No newline at end of file
+AddType text/css .css
+
+
+
+Header always set X-FRAME-OPTIONS "DENY"
+Header set Content-Security-Policy "script-src 'self'"
+
+
+
+ExpiresActive On
+ExpiresDefault "access plus 1 day"
+
\ No newline at end of file
diff --git a/apps/apps.php b/apps/apps.php
index 5ad3bc1..80a9fff 100644
--- a/apps/apps.php
+++ b/apps/apps.php
@@ -67,9 +67,10 @@ function listFile($dir)
* @author Knah Tsaeb
* @global
* @param string $getDir Default: null
+ * @param bool $urlRewrite Default: false
* @return string
*/
-function makeMenu($getDir = null)
+function makeMenu($getDir = null, $urlRewrite = false)
{
$dirList = listDir();
$menu = '';
@@ -77,7 +78,7 @@ function makeMenu($getDir = null)
if ($getDir === $dir) {
$expand = 'open';
} else {
- $expand = 'close';
+ $expand = '';
}
$menu .= '
@@ -85,7 +86,11 @@ function makeMenu($getDir = null)
diff --git a/index.php b/index.php
index c2cd24c..7a9379a 100644
--- a/index.php
+++ b/index.php
@@ -2,6 +2,13 @@
require 'vendor/autoload.php';
require 'apps/apps.php';
+if (in_array ("mod_rewrite", apache_get_modules()))
+{
+ $urlRewrite = true;
+} else {
+ $urlRewrite = false;
+}
+
$dir = $_GET['dir'] ?? '';
$file = $_GET['file'] ?? '';
diff --git a/tpl/aside.html b/tpl/aside.html
index 09db6d0..e8ed521 100644
--- a/tpl/aside.html
+++ b/tpl/aside.html
@@ -1,8 +1,6 @@
\ No newline at end of file
+
diff --git a/tpl/header.html b/tpl/header.html
index 692c28f..e36f562 100644
--- a/tpl/header.html
+++ b/tpl/header.html
@@ -20,12 +20,16 @@
+
+
+
+
-
\ No newline at end of file
+
diff --git a/tpl/main.html b/tpl/main.html
index 04e2d30..a7a901c 100644
--- a/tpl/main.html
+++ b/tpl/main.html
@@ -1,6 +1,8 @@
-
+
+
\ No newline at end of file